package org.example.erp.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 物料入库单行表
 * @TableName wm_item_recpt_line
 */
@TableName(value ="wm_item_recpt_line")
@Data
public class WmItemRecptLine implements Serializable {
    /**
     * 行ID
     */
    @TableId(type = IdType.AUTO)
    private Long lineId;

    /**
     * 入库单ID
     */
    private Long recptId;

    /**
     * 物料产品编号
     */
    private Integer materialNo;

    /**
     * 物料产品编码
     */
    private String materialProductCode;

    /**
     * 物料产品名称
     */
    private String productName;

    /**
     * 规格型号
     */
    private String specificationAndModel;

    /**
     * 单位
     */
    private Integer unitId;

    /**
     * 入库数量
     */
    private Double quantityReceived;

    /**
     * 入库批次号
     */
    private String batchCode;

    /**
     * 仓库编号
     */
    private Integer warehouseId;

    /**
     * 仓库编码
     */
    private String warehouseCode;

    /**
     * 仓库名称
     */
    private String warehouseName;

    /**
     * 库区编号
     */
    private Integer warehouseAreaId;

    /**
     * 库区编码
     */
    private String warehouseAreaCode;

    /**
     * 库区名称
     */
    private String warehouseAreaName;

    /**
     * 库位编号
     */
    private Integer warehouseLocationId;

    /**
     * 库位编码
     */
    private String warehouseLocationCode;

    /**
     * 库位名称
     */
    private String warehouseLocationName;

    /**
     * 有效期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date expireDate;

    /**
     * 备注信息
     */
    private String remark;

    @TableField(exist = false)
    private String unitName;

    @TableField(exist = false)
    private String specification_and_model;

    private String wocumentAmount;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WmItemRecptLine other = (WmItemRecptLine) that;
        return (this.getLineId() == null ? other.getLineId() == null : this.getLineId().equals(other.getLineId()))
            && (this.getRecptId() == null ? other.getRecptId() == null : this.getRecptId().equals(other.getRecptId()))
            && (this.getMaterialNo() == null ? other.getMaterialNo() == null : this.getMaterialNo().equals(other.getMaterialNo()))
            && (this.getMaterialProductCode() == null ? other.getMaterialProductCode() == null : this.getMaterialProductCode().equals(other.getMaterialProductCode()))
            && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
            && (this.getSpecificationAndModel() == null ? other.getSpecificationAndModel() == null : this.getSpecificationAndModel().equals(other.getSpecificationAndModel()))
            && (this.getUnitId() == null ? other.getUnitId() == null : this.getUnitId().equals(other.getUnitId()))
            && (this.getQuantityReceived() == null ? other.getQuantityReceived() == null : this.getQuantityReceived().equals(other.getQuantityReceived()))
            && (this.getBatchCode() == null ? other.getBatchCode() == null : this.getBatchCode().equals(other.getBatchCode()))
            && (this.getWarehouseId() == null ? other.getWarehouseId() == null : this.getWarehouseId().equals(other.getWarehouseId()))
            && (this.getWarehouseCode() == null ? other.getWarehouseCode() == null : this.getWarehouseCode().equals(other.getWarehouseCode()))
            && (this.getWarehouseName() == null ? other.getWarehouseName() == null : this.getWarehouseName().equals(other.getWarehouseName()))
            && (this.getWarehouseAreaId() == null ? other.getWarehouseAreaId() == null : this.getWarehouseAreaId().equals(other.getWarehouseAreaId()))
            && (this.getWarehouseAreaCode() == null ? other.getWarehouseAreaCode() == null : this.getWarehouseAreaCode().equals(other.getWarehouseAreaCode()))
            && (this.getWarehouseAreaName() == null ? other.getWarehouseAreaName() == null : this.getWarehouseAreaName().equals(other.getWarehouseAreaName()))
            && (this.getWarehouseLocationId() == null ? other.getWarehouseLocationId() == null : this.getWarehouseLocationId().equals(other.getWarehouseLocationId()))
            && (this.getWarehouseLocationCode() == null ? other.getWarehouseLocationCode() == null : this.getWarehouseLocationCode().equals(other.getWarehouseLocationCode()))
            && (this.getWarehouseLocationName() == null ? other.getWarehouseLocationName() == null : this.getWarehouseLocationName().equals(other.getWarehouseLocationName()))
            && (this.getExpireDate() == null ? other.getExpireDate() == null : this.getExpireDate().equals(other.getExpireDate()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getLineId() == null) ? 0 : getLineId().hashCode());
        result = prime * result + ((getRecptId() == null) ? 0 : getRecptId().hashCode());
        result = prime * result + ((getMaterialNo() == null) ? 0 : getMaterialNo().hashCode());
        result = prime * result + ((getMaterialProductCode() == null) ? 0 : getMaterialProductCode().hashCode());
        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
        result = prime * result + ((getSpecificationAndModel() == null) ? 0 : getSpecificationAndModel().hashCode());
        result = prime * result + ((getUnitId() == null) ? 0 : getUnitId().hashCode());
        result = prime * result + ((getQuantityReceived() == null) ? 0 : getQuantityReceived().hashCode());
        result = prime * result + ((getBatchCode() == null) ? 0 : getBatchCode().hashCode());
        result = prime * result + ((getWarehouseId() == null) ? 0 : getWarehouseId().hashCode());
        result = prime * result + ((getWarehouseCode() == null) ? 0 : getWarehouseCode().hashCode());
        result = prime * result + ((getWarehouseName() == null) ? 0 : getWarehouseName().hashCode());
        result = prime * result + ((getWarehouseAreaId() == null) ? 0 : getWarehouseAreaId().hashCode());
        result = prime * result + ((getWarehouseAreaCode() == null) ? 0 : getWarehouseAreaCode().hashCode());
        result = prime * result + ((getWarehouseAreaName() == null) ? 0 : getWarehouseAreaName().hashCode());
        result = prime * result + ((getWarehouseLocationId() == null) ? 0 : getWarehouseLocationId().hashCode());
        result = prime * result + ((getWarehouseLocationCode() == null) ? 0 : getWarehouseLocationCode().hashCode());
        result = prime * result + ((getWarehouseLocationName() == null) ? 0 : getWarehouseLocationName().hashCode());
        result = prime * result + ((getExpireDate() == null) ? 0 : getExpireDate().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", lineId=").append(lineId);
        sb.append(", recptId=").append(recptId);
        sb.append(", materialNo=").append(materialNo);
        sb.append(", materialProductCode=").append(materialProductCode);
        sb.append(", productName=").append(productName);
        sb.append(", specificationAndModel=").append(specificationAndModel);
        sb.append(", unitId=").append(unitId);
        sb.append(", quantityReceived=").append(quantityReceived);
        sb.append(", batchCode=").append(batchCode);
        sb.append(", warehouseId=").append(warehouseId);
        sb.append(", warehouseCode=").append(warehouseCode);
        sb.append(", warehouseName=").append(warehouseName);
        sb.append(", warehouseAreaId=").append(warehouseAreaId);
        sb.append(", warehouseAreaCode=").append(warehouseAreaCode);
        sb.append(", warehouseAreaName=").append(warehouseAreaName);
        sb.append(", warehouseLocationId=").append(warehouseLocationId);
        sb.append(", warehouseLocationCode=").append(warehouseLocationCode);
        sb.append(", warehouseLocationName=").append(warehouseLocationName);
        sb.append(", expireDate=").append(expireDate);
        sb.append(", remark=").append(remark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}